DIR = ../..

AS := as
LD := ld
CC := gcc

LDFLAGS := -r
CFLAGS	= -Wall -O2 -fstrength-reduce \
	 -finline-functions -fno-builtin -nostdinc -nostdlib -nodefaultlibs \
	 -I$(DIR)/include -DCNIX
MKFLAGS := -C

export AS LD CC LDFLAGS CFLAGS CPP MKFLAGS

all:	iso9660.mo

OBJS := $(patsubst %.c, %.o, $(wildcard *.c))
OBJS += $(patsubst %.S, %.o, $(wildcard *.S))

iso9660.mo:	$(OBJS)
	$(LD) $(LDFLAGS) -o $@ $(OBJS)

%.o: %.c
	$(CC) $(CFLAGS) -c $<
%.o: %.S
	$(CC) $(CFLAGS) -c $<

clean:
	rm -f *.o .*.swp *~ iso9660.mo
